﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace TA.DotNetUtils
{
	[Serializable]
	public struct Range<T>
	{
		public Range(T start, T end)
		{
			this._start = start;
			this._end = end;
		}
		public T Start { get { return this._start; } set { this._start = value; } }
		public T End { get { return this._end; } set { this._end = value; } }

		public override string ToString()
		{
			return string.Format("{0} - {1}", this._start, this._end);
		}

		T _start, _end;	
	}
	[Serializable]
	public struct DateTimeRange
	{
		public DateTimeRange(DateTime start, DateTime end)
		{
			this._start = start;
			this._end = end;
		}
		public DateTime Start { get { return this._start; } set { this._start = value; } }
		public DateTime End { get { return this._end; } set { this._end = value; } }

		public override string ToString()
		{
			return string.Format("{0} - {1}", this._start, this._end);
		}

		DateTime _start, _end;
	}
	[Serializable]
	public struct LongRange
	{
		public LongRange(long start, long end)
			: this()
		{
			this._start = start;
			this._end = end;
		}

		public long Start { get { return this._start; } set { this._start = value; } }
		public long End { get { return this._end; } set { this._end = value; } }

		public override string ToString()
		{
			return string.Format("{0} - {1}", this._start, this._end);
		}

		long _start, _end;
	}
	[Serializable]
	public struct DoubleRange
	{
		public DoubleRange(double start, double end)
			: this()
		{
			this._start = start;
			this._end = end;
		}

		public double Start { get { return this._start; } set { this._start = value; } }
		public double End { get { return this._end; } set { this._end = value; } }

		public override string ToString()
		{
			return string.Format("{0} - {1}", this._start, this._end);
		}

		double _start, _end;
	}
}
